import { ImagePreview } from "vant";

interface PropsInterface {
	imgUrl: string;
}

const usePreview = (props: PropsInterface) => {
	const { imgUrl } = props;

	const preview = () => {
		const image = ImagePreview;
		image({
			images: [imgUrl],
			closeable: true,
		});
	};

	return {
		preview,
	};
};

export default usePreview;
